package com.gwtgeo.ui.shared.event;

import java.util.List;

import com.google.gwt.event.shared.GwtEvent;
import com.gwtgeo.service.model.Location;

public class SelectionRetrievedEvent extends GwtEvent<SelectionRetrievedEventHandler>{

	public static Type<SelectionRetrievedEventHandler> TYPE = new Type<SelectionRetrievedEventHandler>();
	
	private List<Location> locations;
	
	public SelectionRetrievedEvent() {
		super();
	}

	public SelectionRetrievedEvent(List<Location> locations) {
		super();
		this.locations = locations;
	}

	@Override
	protected void dispatch(SelectionRetrievedEventHandler handler) {
		handler.onSelectionRetrieved(this);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<SelectionRetrievedEventHandler> getAssociatedType() {
		return TYPE;
	}

	public List<Location> getLocations() {
		return locations;
	}
}
